#pragma once
#define MAXPATH 1024

typedef struct path_component
{
    char* component;
    struct path_component* prev;
    struct path_component* next;
} PathComponent;

typedef struct
{
    PathComponent* head;
    PathComponent* tail;
} Path;

void path_init(Path* path);
void path_destroy(Path* path);

Path path_build(char* s);
char* path_str(const Path* path);
Path path_cd_absolutely(char* s);
Path path_cd_relatively(const Path* path, char* s);
